Skip to content

Resolve disabled research composition before loading execution - #8744

Merged
cocolord merged 1 commit into
mainfrom
codex/r1-replan-disabled-loading-20261114t062007
Nov 14, 2026
Merged

cocolord merged 1 commit into
mainfrom
codex/r1-replan-disabled-loading-20261114t062007

Conversation

@cocolord

@cocolord cocolord commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

A replan-associated Todo loaded research execution before resolving the existing disabled-composition policy. An unavailable research implementation could therefore prevent recording a result even when this policy required no research evidence. Move the documented scalar-mode policy and unchanged identifier validation into the existing lightweight Explore configuration owner, and resolve that policy before selecting execution IO. Reject non-string modes: a single-element array previously passed string coercion but produced an inactive policy that skipped research evidence.

The original Todo applicability, Goal-local activation, source hash, terminal authority, writer fence, lease, qualification, CAS, receipt replay and cleanup remain in their existing owners. Existing research policy/identifier exports remain available. Invalid configuration now reports its own error before execution availability; inheritance-only configuration continues to select its original live-policy path.

Validation for 60e6f33780da6e4e9825b8426b18c4a1edc44efb:

  • Source native configuration/research/terminal/authority suite: 83 passed. Real research CLI suite: 11 passed.
  • Matched retained baseline probes fail on both File and SQLite for unavailable execution; the same candidate fixtures pass. Disabled default, explicit-disabled and Goal-off cases persist evidence and replay the original receipt without loading research execution/graph implementations. Enabled failures and invalid configuration commit no completion or receipt.
  • In the same runtime after an enabled dependency failure, an explicitly disabled current source completes the original failed operation once and replays; stale-source attempts remain refused and the earlier ordinary receipt is preserved.
  • All 21 policy and 13 identifier return/error observations match the original owner exactly. An independently built Core wheel, installed alone, passes the same File/SQLite fault/recovery and policy cases; all four production module bytes match this source.
  • C1 combinations retain the original candidate tests and existing producer/consumer owners: C1: unify work sources and validate recovery #8266 b4f9581865325595c685bbde057b10de8c9e9db0 passes 220 selected cases plus the current recovery probe; Unify Turn role execution and define one runtime entry for heartbeat and products #8484 b7e4e01cc42300fb72f85c8d4c9ec3cb96b47798 passes 218. These checks do not qualify either full C1 PR for merge.
  • Full TypeScript, public file scan and staged bilingual check passed. The working-tree standard premerge passed; the final strict-mode committed-head standard gate passed all4 direct and11 selected checks with no failures.

This is a usable dependency-failure and recovery improvement within the existing configuration/terminal owners. It does not select a minimal preset, change execution authority, publish a distribution or establish complete cost/model benefit. Complete D2/D5 closure, real-model/context adoption, progressive controls, R1/M3, C1 cutover and the original-goal regression remain open. Rollback requires no state migration.

The final counterexample audit reproduces the prior array-mode bypass through real File/SQLite completion with dependencies available. The same independent rejection/no-effect oracle passes at the strict-mode head. Earlier baseline faults and the unreviewed candidate are retained as historical evidence; no earlier approval is inherited.

Latest integration readback: main baaf657e5 plus this unchanged head passes 229 native cases, full TypeScript and the latest-target standard premerge. Current C1 #8266 4af53e5b595678cf9bc8b69c95ac2b9fe2395e06, using the actual shared-test merge result, passes 275 selected cases and the same real terminal oracle. Existing C1 conflict-file counts against current main are 9/20 and remain 9/20 after this PR, with no added conflicts.

The expanded real CLI corpus has 76 passes and 12 failures. The same 12 cases and error signatures independently reproduce on the same current main without this PR: four capability_guard field assertions and eight expectations of immediate typed writeback instead of reading current replan context. Preserve these current-main consumer/acceptance gaps; the original-source 11-case CLI result does not claim the latest integration is fully green. The earlier C1 loading-test mismatch is also retained; the actual merge selects this PR's reviewed shared test.

Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>

@cocolord cocolord left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent; GPT-6; OpenAI; self_reported

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机 / Motivation

通过 CLI 记录普通和重规划任务结果的用户与 Agent 会遇到这个问题。研究组合已关闭,但执行模块不可用时,此前重规划任务仍无法记入完成结果;现在先解析同一配置策略,再选择执行实现,关闭路径可直接持久化和重放结果。

源码及独立安装 Core 的真实 File/SQLite 都通过关闭路径的完成、证据回读、原回执重放和错误恢复;选中研究失败仍不写完成状态或回执。本次不选择最小预设、不改变执行权限、不切换 C1 默认管线,也不宣称模型收益、完整成本或整个 RFC 已完成。完整 D2/D5 默认闭包、真实模型与上下文采用、渐进控制、完整成本、R1/M3、C1 切换及原目标回归仍待验证。

反例审查还发现旧字符串转换会让数组 mode 通过检查,却把策略变成 inactive:已启用的研究因此被当成关闭。这个缺口在真实 File/SQLite 上能直接完成不该完成的结果,必须在既有 typed owner 修掉,不能用一个通过的加载测试作为批准依据。

改动思路 / Approach

组合策略和标识校验归回既有轻量配置 owner,终态、研究资格和事务继续由原 owner 负责;无需新增状态、schema 或 C1 管线。当前 PR 交付关闭研究组合时的依赖隔离、合法恢复和错误配置拒绝;完整闭包、模型上下文与 C1 默认切换继续沿既有验收推进。

实际入口仍是 coordination.local_authority.todo_terminal,canonical writer(唯一状态写入边界)读取 Todo 后调用原证据 guard。配置 module 只解析原策略与标识,不承载图或执行策略;只有原 active/inherited 分支选中执行实现。删掉证据检查会降低正确性,新增配置/schema/管线则复制 C1 所要收敛的知识,均没有理由采用。

在精确 head 60e6f33780da6e4e9825b8426b18c4a1edc44efb,源码分支的对比如下;表格是说明,执行证据来自独立的真实状态和回执检查。

输入与依赖 基线/旧候选 最终结果
合法关闭策略,研究执行不可用 重规划完成失败 完成、回读证据、原回执重放
启用/继承路径,选中执行不可用 失败 仍失败;无写入
mode 为单元素数组,依赖可用 错当 inactive,允许完成 原配置 owner 拒绝;无写入
失败后明确关闭策略 依赖错误持续阻断 仅当前 source 能恢复原失败身份;旧 source 拒绝

具体改动 / Changes

全量八文件 diff 为 186 行新增、32 行删除;生产改动移动原定义、删除原处实现并调整加载位置,保留旧模块的导出。测试扩展既有真实新进程 fixture,双语 checkpoint 记录范围与负向结果,没有新增模块、状态、CLI 字段、私有运行文件或永久执行管线。

关键代码讲解

  1. normalizeResearchCompositionPolicy 归回已有配置 owner,保留原 scalar mode、默认值、scope 与严格 enabled=true 语义。类型检查替代 String 强制转换;数组及嵌套数组不能把研究偷偷关闭,配置错误优先于执行 IO。
  2. researchIdentifier 复用原 public-safe 字符和长度规则,研究证据模块仍导出原名称。21 项策略与13 项标识的完整返回/错误观察不变;新的 malformed-shape 拒绝是明确的修复,不把旧失败重标成通过。
  3. ResearchTerminalEvidenceHost.qualify 保持原 Todo 适用性、registry digest 和 Goal-local 策略,关闭后直接返回 no-required-evidence;只有需执行的原分支才 import 研究实现。live inheritance 没有被一个 !enabled 快捷条件捕获。
  4. terminalLifecycleLocalCoordinationTodo 仍拥有真实请求、actor/claim/lease、writer/source-current/CAS 与回执交易;current/close 保留原清理。新进程 fixture 独立读两种 store 的 done、evidence、receipt,重复失败与重放后比较完整状态,不能以 mock 提供结果。

评审参考 docs/architecture/rfcs/monorepo-distribution-split-v0.md,固定在变更前 bebce99a921dc7df01460b19e81066757b3fcdde,新增 checkpoint 不反过来定义成功。V1 的完整闭包仍 deferred,当前只验证配置到终态依赖;V2 的本路径 authority/replay 和 V3 的研究 CLI 回归通过,但完整两预设/命令 corpus 仍 deferred。V4、V5、V10、R1、M3、D2、D5 均继续 deferred,需要真实 Host/上下文、可比完整成本和既有最小组合/发布验收。C1 还须完成原 controller RFC 的 writer/consumer 和安装采用。

对主干的风险 / Risks

主要风险是把错误配置或被选中的研究义务误当关闭,或让缓存的模块失败永久阻断恢复。最终 fixture 用同一真实容器中的普通/选中 Todo 检查两边;合法关闭不加载图/执行模块,启用与仅继承配置仍选中执行,无效 mode/scope 先拒绝。数组 bypass 在先前候选、依赖可用的 File/SQLite 都让独立 no-effect oracle 失败;同一用例在最终修复拒绝,历史结果保留。

失败两次无状态/回执后,明确关闭的当前来源能以原失败 operation 完成一次并重放,旧来源不能提交,较早普通回执也不变。该恢复使用已有配置和身份权限,没有从依赖异常推导成功。source、writer、lease、资格、CAS 与清理不降低,回滚无需状态迁移,也不重写历史凭据。

PASS:final production/test bytes 对应的 native83、真实研究 CLI11、全树 TypeScript、独立 Core v2 的同一故障/恢复/错误形状矩阵与原34 项 API 观察;最终提交 standard premerge 的4 项直接检查和11 项选中检查;staged/head 双语与八文件 public scan。Core v1、原依赖故障与9e5b83ef8 数组反例均单独保留,当前 Core 四个模块字节与 final source 相同。

C1 #8266 固定在 b4f9581865325595c685bbde057b10de8c9e9db0,#8484 固定在 b7e4e01cc42300fb72f85c8d4c9ec3cb96b47798。保留原 C1 测试并加入同一真实 oracle,220/218 组合检查通过。固定基线到本 head 的 merge-tree 新增冲突为零,原0/13 路径保留;不能据此批准整个 C1,也没有改变作者分支或默认切换。

合入前刷新主线到 baaf657e5,并把本 PR 与该主线实际组合:229 项 native 和全树 TypeScript 通过,精确 head 对最新 target 的 standard premerge 仍为4 项直接检查、11 项选中检查通过。88 项扩展真实 CLI 回归得到76 PASS、12 FAIL;12 个相同失败用例及错误在未加本 PR 的同一主线独立复现。四个研究用例仍直接索引 staged packet 的 capability_guard,八个 typed-progress 用例仍期待 write_typed_semantic_delta,但当前 owner 返回 read_current_replan_context。这些失败保留为当前主线 consumer/验收缺口,不将其写成通过,也不据此完成原目标。

C1 #8266 当前头为 4af53e5b595678cf9bc8b69c95ac2b9fe2395e06。该头原 loading test 与最新 main 字节相同,仍断言关闭策略的依赖故障应阻断完成;仅叠加生产代码时它确实失败,历史输出保留。Git 实际合并产生的共享测试恰好等于本 PR 已审测试;按该真实合并结果保留其他 C1 测试后,275 项与同一真实终态 oracle 通过。最新主线对 #8266/#8484 原有9/20 个冲突文件,加入本 PR 后仍9/20,新增为零。此结果支持本 PR 与 C1 方向一致,不批准整个 C1 或改变其作者分支。

UNVERIFIED:当前远端 CI 多数排队,原因未知,作为独立 diagnostic 保留,未宣称全绿。全部模型/Host、其他平台/backend、完整上下文、渐进产品界面及完整成本不由这些 native/install tests 证明,完整目标回归还未执行。

语义与 CI 对齐

复用已有模式/状态 vocabulary,没有新 Enum、schema 或义务文本。mode 以原 literal 类型判断,研究领域留在 capability 配置,不以字符串转换或 prose 分类通用任务。既有 Goal activation/availability/authority 分离;错误形状拒绝和 config-before-IO 是明确验证的 intentional deltas。semantic vocabulary 与 final premerge 通过,CI/readiness 和合入授权继续单独判断。

我的整体评价 / Verdict

这是 justified_increment,已经交付可持久化、独立回读和重复重放的有效结果,并补上真实配置绕过;long_horizon 与 user_experience 在这条路径均 improved。它减少无关依赖恢复,错误配置得到可执行诊断,既有用户任务增加零必需导航/确认轮次。单一已有配置 owner 的 architecture assessment 为 retain,边界可独立测试与回滚,兼容性保留有实际旧调用者和回执依据。

本次没有页面、首屏或控制名称变化;检查的是既有配置与终态 CLI/native 路径。真实模型采用、上下文保持和渐进产品控制仍未验证。没有未解决阻断 finding;最终 head 为 60e6f33780da6e4e9825b8426b18c4a1edc44efb,不继承旧候选批准,也不关闭原目标。APPROVE 与 queued CI、merge-readiness 和权限分别处理。

English verdict: APPROVE 60e6f33. The existing configuration owner resolves policy before optional research execution; real File/SQLite completion, original-receipt replay, source recovery and malformed-mode rejection pass in source and standalone Core v2. Native, original-source CLI, API parity, current C1 combination and latest-target premerge pass. The expanded integration has 76 passes and 12 failures independently reproduced on current main without this PR. Full RFC/model/context/cost acceptance, those consumer gaps and queued CI remain separate.

@cocolord
cocolord merged commit 6266c3e into main Nov 14, 2026
13 of 17 checks passed
@cocolord
cocolord deleted the codex/r1-replan-disabled-loading-20261114t062007 branch November 14, 2026 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant